<?php /*a:3:{s:62:"/www/practice/douyin/application/admin/view/addons/config.html";i:1709089081;s:61:"/www/practice/douyin/application/admin/view/index_layout.html";i:1710484120;s:54:"/www/practice/douyin/application/admin/view/layui.html";i:1712799662;}*/ ?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title><?php echo config('site.web_name'); ?></title>
    <meta name="author" content="YZNCMS">
    <link rel="stylesheet" href="/static/libs/layui/css/layui.css">
    <link rel="stylesheet" href="/static/admin/css/admin.css?v=<?php echo htmlentities(app('config')->get('version.yzncms_release')); ?>">
    <link rel="stylesheet" href="/static/common/font/iconfont.css?v=<?php echo htmlentities(app('config')->get('version.yzncms_release')); ?>">
    <script src="/static/libs/layui/layui.js"></script>
    <script src="/static/libs/jquery/jquery.min.js"></script>
    <script type="text/javascript">
    //全局变量
    var GV = {
        'site':<?php echo json_encode($site); ?>,
        'image_upload_url': '<?php echo !empty($image_upload_url) ? htmlentities($image_upload_url) :  url("admin/ajax/upload", ["dir" => "images"]); ?>',
        'file_upload_url': '<?php echo !empty($file_upload_url) ? htmlentities($file_upload_url) :  url("admin/ajax/upload", ["dir" => "files"]); ?>',
        'attachment_select_url': '<?php echo !empty($attachment_select_url) ? htmlentities($attachment_select_url) :  url("general.attachments/select"); ?>',
    };
    </script>
</head>

<body class="childrenBody <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
    
<form class="layui-form" action="" method="post" data-field="config">
    <div class="layui-card">
        <?php if($data['tips']  && $data['tips']['value']): ?>
        <div class="alert alert-info-light" style="margin-bottom:10px;">
            <?php if($data['tips']['title']): ?>
            <b><?php echo htmlentities($data['tips']['title']); ?></b><br>
            <?php endif; ?>
            <?php echo $data['tips']['value']; ?>
        </div>
        <?php endif; ?>
        <div class="layui-card-body">
        <?php if(is_array($data['config']) || $data['config'] instanceof \think\Collection || $data['config'] instanceof \think\Paginator): if( count($data['config'])==0 ) : echo "" ;else: foreach($data['config'] as $o_key=>$form): ?>
             <div data-favisible="<?php echo htmlentities((isset($form['visible']) && ($form['visible'] !== '')?$form['visible']:'')); ?>">
             <?php switch($form['type']): case "text": ?>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
                        <div class="layui-input-block">
                            <input type="text" name="config[<?php echo htmlentities($form['name']); ?>]" placeholder="请输入<?php echo htmlentities($form['title']); ?>" autocomplete="off" class="layui-input" value="<?php echo htmlentities($form['value']); ?>">
                        </div>
                        <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
                    </div>
                   <?php break; case "password": ?>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
                        <div class="layui-input-block">
                            <input type="password" name="config[<?php echo htmlentities($form['name']); ?>]" placeholder="请输入<?php echo htmlentities($form['title']); ?>" autocomplete="off" class="layui-input" value="<?php echo htmlentities($form['value']); ?>">
                        </div>
                        <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
                    </div>
                   <?php break; case "array": ?>
					<div class="layui-form-item">
					    <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
					    <dl class="layui-input-block fieldlist" data-name="config[<?php echo htmlentities($form['name']); ?>]" data-id="<?php echo htmlentities($form['name']); ?>">
					                <dd>
                                <ins>键名</ins>
                                <ins>键值</ins>
                            </dd>
					        <dd><button type="button" class="layui-btn btn-append">追加</button></dd>
					        <textarea name="config[<?php echo htmlentities($form['name']); ?>]" class="layui-textarea layui-hide"><?php echo htmlentities(json_encode($form['value'])); ?></textarea>
					    </dl>
					    <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
					</div>
					<script type="text/html" id="<?php echo htmlentities($form['name']); ?>Tpl">
					    <dd class="layui-form-item rules-item">
					    {{# layui.each(d.lists, function(index, item) { }}
						    <input type="text" class="layui-input" name="{{item.name}}[{{item.index}}][key]" placeholder="键" value="{{item.key|| ''}}" />
						    <input type="text" class="layui-input" name="{{item.name}}[{{item.index}}][value]" placeholder="值" value="{{item.value|| ''}}" />
						    <button type="button" class="layui-btn layui-btn-danger btn-remove layui-btn-xs"><i class="iconfont icon-close"></i></button>
						    <button type="button" class="layui-btn btn-dragsort layui-btn-xs"><i class="iconfont icon-yidong"></i></button>
					    {{# }); }}
					    </dd>
					</script>
					<?php break; case "checkbox": ?>
					<div class="layui-form-item">
					    <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
					    <div class="layui-input-block">
					        <?php if(is_array($form['options']) || $form['options'] instanceof \think\Collection || $form['options'] instanceof \think\Paginator): if( count($form['options'])==0 ) : echo "" ;else: foreach($form['options'] as $opt_k=>$opt): ?>
					        <input type="checkbox" name="config[<?php echo htmlentities($form['name']); ?>][]" lay-skin="primary" title="<?php echo htmlentities($opt); ?>" value="<?php echo htmlentities($opt_k); ?>" <?php if(in_array(($opt_k), is_array((isset($form['value']) && ($form['value'] !== '')?$form['value']:''))?(isset($form['value']) && ($form['value'] !== '')?$form['value']:''):explode(',',(isset($form['value']) && ($form['value'] !== '')?$form['value']:'')))): ?> checked<?php endif; ?>>
					        <?php endforeach; endif; else: echo "" ;endif; ?>
					    </div>
					    <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
					</div>
					<?php break; case "textarea": ?>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
                        <div class="layui-input-block">
                            <textarea placeholder="请输入<?php echo htmlentities($form['title']); ?>" class="layui-textarea" name="config[<?php echo htmlentities($form['name']); ?>]"><?php echo htmlentities($form['value']); ?></textarea>
                        </div>
                        <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
                    </div>
                    <?php break; case "password": ?>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
                        <div class="layui-input-block">
                            <input type="password" name="config[<?php echo htmlentities($form['name']); ?>]" placeholder="请输入<?php echo htmlentities($form['title']); ?>" autocomplete="off" class="layui-input" value="<?php echo htmlentities($form['value']); ?>">
                        </div>
                        <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
                    </div>
                   <?php break; case "radio": ?>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
                        <div class="layui-input-block">
                            <?php if(is_array($form['options']) || $form['options'] instanceof \think\Collection || $form['options'] instanceof \think\Paginator): if( count($form['options'])==0 ) : echo "" ;else: foreach($form['options'] as $opt_k=>$opt): ?>
                            <input type="radio" name="config[<?php echo htmlentities($form['name']); ?>]" value="<?php echo htmlentities($opt_k); ?>" title="<?php echo htmlentities($opt); ?>" <?php if($form['value'] == $opt_k): ?> checked<?php endif; ?>>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </div>
                        <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
                    </div>
                   <?php break; case "select": ?>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
                        <div class="layui-input-block">
                            <select name="config[<?php echo htmlentities($form['name']); ?>]">
                                <option value=""></option>
                                <?php if(is_array($form['options']) || $form['options'] instanceof \think\Collection || $form['options'] instanceof \think\Paginator): if( count($form['options'])==0 ) : echo "" ;else: foreach($form['options'] as $opt_k=>$opt): ?>
                                <option value="<?php echo htmlentities($opt_k); ?>" <?php if($form['value'] == $opt_k): ?>selected<?php endif; ?>><?php echo htmlentities($opt); ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                        <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
                    </div>
                    <?php break; case "image": case "images": ?>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
                        <div class="layui-input-block">
                            <div class="layui-col-xs4">
                                <input type="text" name="config[<?php echo htmlentities($form['name']); ?>]"  id="c-<?php echo htmlentities($form['name']); ?>" value="<?php echo htmlentities((isset($form['value']) && ($form['value'] !== '')?$form['value']:'')); ?>" class="layui-input">
                            </div>
                            <button type="button" class="layui-btn faupload" id="faupload-<?php echo htmlentities($form['name']); ?>" data-multiple="<?php echo $form['type']=='image' ? 'false' : 'true'; ?>" data-input-id="c-<?php echo htmlentities($form['name']); ?>" data-preview-id="p-<?php echo htmlentities($form['name']); ?>" data-type="image"><i class="layui-icon layui-icon-upload"></i> 上传</button><button type="button" class="layui-btn fachoose" data-multiple="<?php echo $form['type']=='image' ? 'false' : 'true'; ?>" data-input-id="c-<?php echo htmlentities($form['name']); ?>" id="fachoose-c-<?php echo htmlentities($form['name']); ?>"><i class="iconfont icon-other"></i> 选择</button>
                            <ul class="layui-row list-inline plupload-preview" id="p-<?php echo htmlentities($form['name']); ?>"></ul>
                        </div>
                        <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
                    </div>
                    <?php break; case "file": case "files": ?>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
                        <div class="layui-input-block">
                            <div class="layui-col-xs4">
                                <input type="text" name="config[<?php echo htmlentities($form['name']); ?>]"  id="c-<?php echo htmlentities($form['name']); ?>" value="<?php echo htmlentities((isset($form['value']) && ($form['value'] !== '')?$form['value']:'')); ?>" class="layui-input">
                            </div>
                            <button type="button" class="layui-btn faupload" id="faupload-<?php echo htmlentities($form['name']); ?>" data-multiple="<?php echo $form['type']=='file' ? 'false' : 'true'; ?>" data-input-id="c-<?php echo htmlentities($form['name']); ?>" data-preview-id="p-<?php echo htmlentities($form['name']); ?>" data-type="file"><i class="layui-icon layui-icon-upload"></i> 上传</button>
                        </div>
                        <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
                    </div>
                    <?php break; case "Ueditor": ?>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><?php echo htmlentities($form['title']); ?></label>
                        <div class="layui-input-block">
                            <script type="text/plain" class="js-ueditor" id="<?php echo htmlentities($form['name']); ?>" name="config[<?php echo htmlentities($form['name']); ?>]"><?php echo $form['value']; ?></script>
                        </div>
                        <?php if(isset($form['tip']) && $form['tip']): ?><div class="layui-form-mid2 layui-word-aux"><?php echo $form['tip']; ?></div><?php endif; ?>
                    </div>
                    <?php break; ?>
             <?php endswitch; ?>
             </div>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        </div>
    </div>
    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit data-refresh="false">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>

    
    <script type="text/javascript">
layui.config({
	version: '<?php echo htmlentities(app('config')->get('version.yzncms_release')); ?>',
	base: '/static/libs/layui_exts/'
}).extend({
	yzn: 'yzn/yzn',
	yznForm: 'yznForm/yznForm',
	tab: "pear/tab",               // 多选项卡组件
	yznUpload: 'yznUpload/yznUpload',
	yznTable: 'yznTable/yznTable',
	clipboard: 'clipboard/clipboard.min',
	notice: 'notice/notice.min',
	iconPicker: 'iconPicker/iconPicker.min',
	ztree: 'ztree/ztree',
	dragsort: 'dragsort/dragsort.min',
	tagsinput: 'tagsinput/tagsinput',
	xmSelect: 'xmSelect/xm-select',
	selectPage: 'selectPage/selectpage.min',
	echarts: 'echarts/echarts',
	echartsTheme: 'echarts/echartsTheme',
	citypicker: 'citypicker/city-picker',
	dropzone: 'dropzone/dropzone.min',
	ueditor: 'ueditor/ueditor.min',
	cxselect: 'cxselect/cxselect',
	addons: 'addons',
    aliossUploader:'aliossUploader'
});
</script>
    
    
<script type="text/javascript">
layui.use('yznForm', function() {
    var yznForm = layui.yznForm;

    yznForm.bindevent($("form.layui-form"));
});
</script>

</body>

</html>